#ifndef _PID_H_
#define _PID_H_
#define KP 0
#define KI 1
#define KD 2
#define KT 3

typedef struct PID // 用来PID参数计算变量
{
	float SumError;	 // 误差累计
	int LastError; // 上次误差
	int PrevError; // 预测误差
	int LastData;	 // 上次数据
} PID;

extern PID speedcircle;
int PlacePID_Control(PID *sprt, float *PID, int NowPiont, float SetPoint);
int PID_Increase(PID *sptr, float *PID, int NowPoint, int SetPoint);
int PID_Realize(PID *sptr, float *PID, int NowPoint, int SetPoint);
#endif
